import {ref, defineComponent, getCurrentInstance} from "vue";
import {Delete, Edit, Refresh, Search, Share} from "@element-plus/icons-vue";
import queryReqVO from "../vo/queryReqVO.ts";
import Pagination from "../../component/pagination/views/pagination.vue";

export default defineComponent({
    name: 'taskController',
    methods: {Search, Delete, Share, Edit},
    components: {Pagination, Search, Refresh},
    props: {},
    emits: [],
    setup(props, {emit}) {
        // 获取当前实例
        const {proxy, appContext} = getCurrentInstance()!;

        const queryFrom = ref(new queryReqVO());

        const total = ref(1);
        const pageSize = ref(10);
        const currentPage = ref(1);
        const totalResult = ref(1);
        const tableData = [{}
           
        ]

        /**
         * @description: 查询
         * @author: licong
         * @date: 2024-02-05 13:24:51
         */
        const onSubmit = () =>{
            console.log('aaaaaaa')
        }

        /**
         * @description: 重置查询条件
         * @author: licong
         * @date: 2024-02-05 13:25:12
         */
        const reset = () =>{

        }

        /**
         * @description: 编辑信息
         * @author: licong
         * @date: 2024-02-05 13:25:26
         */
        const handleEdit = (row: any) =>{
            console.log(row)
        }

        /**
         * @description: 删除
         * @author: licong
         * @date: 2024-02-05 13:25:36
         */
        const handleDelete = (row: any) =>{
            console.log(row)
        }

        return {
            tableData,
            queryFrom,
            total,
            pageSize,
            currentPage,
            totalResult,
            onSubmit,
            reset,
            handleDelete,
            handleEdit
        }
    }
})